<%--
Document : create
Created on : Sep 25, 2013, 3:44:44 PM
Author : mrnghiep
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
        <title>Đăng tin Mất giấy tờ - Nhặt được giấy tờ</title>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <style type="text/css">
            
        </style>
        <script type="text/javascript"src="js/validateFormCreate.js"></script>
    </head>

    <body onload="return loadTitle();">
        <%-- Check session CHECKEXISTXML, If null marshall XML --%>
        <c:set var="check" value="${sessionScope.CHECKEXISTXML}"/>
        <c:if test="${check eq null}">
            <jsp:forward page="/Info">
                <jsp:param name="action" value="marshall"/>
                <jsp:param name="currentUrl" value="create.jsp"/>
            </jsp:forward>
        </c:if>
        <c:import var="xsltdoc" url="xslt/information.xsl" charEncoding="UTF-8" />
        <c:import var="xmldoc" url="xml/information.xml" charEncoding="UTF-8" />
        <%-- End Check session CHECKEXISTXML --%>
        <div id="nav">
            <jsp:include page="nav.jsp"/>
        </div> <!-- nav #end -->

        <div id="header">
            <jsp:include page="header.jsp"/>
        </div> <!-- header #end -->

        <div id="wrapper">
            <div id="content"> <!-- Thay Thế -->
                <div class="content_top">
                    <div class="content_bottom" id="parent">
                        <h1 class="page_head" id="page_head">

                        </h1>
                        <c:set var="checkStatus" value="${sessionScope.STATUS}"/>
                        <c:if test="${not empty checkStatus}">
                            <div id="createStatus" class="createStatus">
                                <p>${sessionScope.STATUS}</p>
                            </div>
                        </c:if>

                        <form action="Create" name="FormCreate" enctype="multipart/form-data" method="post">
                            <table class="tableCreate">
                                <tbody>
                                    <tr>
                                        <td colspan="2"><h4>Thông tin liên lạc của bạn</h4></td>
                                    </tr>
                                    <tr>
                                        <td> Họ và tên:</td>
                                        <td>
                                            <input type="text" onchange="return validateFullName();"  name="txtFullname" value="" />
                                            <input id="type" name="txtCate" type="hidden" value="${param.type}"/>
                                        </td>
                                        <td>
                                            <p class="valid" id="fullnameV"></p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Địa chỉ:</td>
                                        <td><input type="text" onchange="return validateAddress();" name="txtAddress" value="" /></td>
                                        <td>
                                            <p class="valid" id="addressV"></p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Email: </td>
                                        <td><input type="text" onchange="return validateEmail();" name="txtEmail" value="" placeholder="abc@def.xyz" /></td>
                                        <td>
                                            <p class="valid" id="emailV"></p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Số điện thoại:</td>
                                        <td> <input type="text" onchange="return validatePhone();" name="txtPhone" value=""/></td>
                                        <td>
                                            <p class="valid" id="phoneV"></p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"><h4 id="titleH3"></h4></td>
                                    </tr>
                                    <tr>
                                        <td>Số CMND/Biển số xe/Bằng lái xe:</td>
                                        <td><input type="text" onchange="return validateInfo();" name="txtInfo" value="" /> </td>
                                        <td>
                                            <p class="valid" id="infoV"></p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Loại Vật dụng/Giấy tờ:</td>
                                        <td> <select multiple name="cboType" id="cboType" onchange="return validateType();">
                                                <option value="CMND">CMND</option>
                                                <option value="Hộ chiếu">Hộ chiếu</option>
                                                <option value="Bằng lái xe">Bằng lái xe</option>
                                                <option value="Giấy tờ xe">Giấy tờ xe</option>
                                                <option value="Thẻ sinh viên, học viên">Thẻ sinh viên, học viên</option>
                                                <option value="Bằng cấp, chứng chỉ">Bằng cấp, chứng chỉ</option>
                                                <option value="Thẻ ATM, tín dụng">Thẻ ATM, tín dụng</option>
                                                <option value="Giấy tờ nhà – đất">Giấy tờ nhà – đất</option>
                                                <option value="Hợp đồng – tài liệu">Hợp đồng – tài liệu</option>
                                                <option value="Sổ hộ khẩu">Sổ hộ khẩu</option>
                                                <option value="Laptop, USB, điện thoại">Laptop, USB, điện thoại…</option>
                                                <option value="Thú nuôi">Thú nuôi</option>
                                                <option value="Đồ vật khác">Đồ vật khác</option>
                                            </select>
                                            <input type="hidden" name="txtType" id="txtType"/>
                                        </td>
                                        <td>
                                            <p class="valid" id="typeV"></p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td id="location"></td>
                                        <td><input type="text" onchange="return validateLocation();" name="txtLocation" value=""/></td>
                                        <td>
                                            <p class="valid" id="locationV"></p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Tên chính chủ:</td>
                                        <td><input type="text" onchange="return validateOwner();" name="txtOwner" value="" /> </td>
                                        <td>
                                            <p class="valid" id="ownerV"></p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Ảnh (nếu có):</td>
                                        <td> <input type="file" accept="image/*" name="txtImage" value="" /> </td>
                                    </tr>
                                    <tr>
                                        <td>Thông tin chi tiết:</td>
                                        <td><textarea onchange="return validateDescription();" name="txtDescription"></textarea> </td>
                                        <td>
                                            <p class="valid" id="descriptionV"></p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td style="padding-top: 20px;"><input type="button" onclick="return validate();" value="Đăng" name="btAction" /><input type="reset" value="Nhập lại" /></td>
                                    </tr>
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div> <!-- content #end -->

            <div id="sidebar" class="sidebar_spacer" >

                <div class="widget widget_nav_menu">
                    <jsp:include page="menu.jsp"/>
                </div>

                <div class="widget Widget_Simplicy_Post">
                    <jsp:include page="news-inc.jsp" />
                </div> <!-- And div widget Widget_Simplicy_Post -->

            </div> <!-- wrapper #end -->
        </div>
        <div id="footer">
            <jsp:include page="footer.jsp"/>
        </div><!--footer end-->

    </body>
</html>
